package com.aizuda.boot.modules.auth.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 第三方用户信息表
 */
@Schema(description="第三方用户信息表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "third_user")
public class ThirdUser {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description="主键")
    private Long id;

    /**
     * 第三方系统的唯一ID
     */
    @TableField(value = "uuid")
    @Schema(description="第三方系统的唯一ID")
    private String uuid;

    /**
     * 第三方用户来源（如飞书、QQ等）
     */
    @TableField(value = "`source`")
    @Schema(description="第三方用户来源（如飞书、QQ等）")
    private String source;

    /**
     * 用户 user_id
     */
    @TableField(value = "user_id")
    @Schema(description="用户 user_id")
    private String userId;

    /**
     * 用户在应用内的唯一标识
     */
    @TableField(value = "open_id")
    @Schema(description="用户在应用内的唯一标识")
    private String openId;

    /**
     * 企业标识
     */
    @TableField(value = "tenant_key")
    @Schema(description="企业标识")
    private String tenantKey;

    public static final String COL_ID = "id";

    public static final String COL_UUID = "uuid";

    public static final String COL_SOURCE = "source";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_OPEN_ID = "open_id";

    public static final String COL_TENANT_KEY = "tenant_key";
}
